from flask import Flask, render_template
from settings import Config,db
from models import House
from index_page import index_page

app = Flask(__name__)
app.config.from_object(Config)
db.init_app(app)
app.register_blueprint(index_page,url_prefix='/')    #注册蓝图index_page


@app.route('/')
def test():
    first_user = House.query.first()
    print(first_user)
    return 'OK'




if __name__ == '__main__':
    app.run(debug=True)

